<template>
	<view class="flex-col homepage">
		<view class="u-line-1 text">我的缴费</view>

		<view class="flex-row wrapper" v-for="(j,index) in CommunityList" :key="index" @click="gotoInfo(j)">
			<view class="wraper-col">
				<uni-icons style="top: 10rpx;left: 6rpx;" type="home" size="25"></uni-icons>
			</view>
			<view class="flex-col flex-row wraper-col-two" v-if="j.type==='水费'">
				<view>
					<view class="u-line-1 text-two">
						{{j.type}}
					</view>
					<view style="float: left;bottom: 5rpx;">
						<u-tag style="width: 130rpx;" text="已缴费" type="success"></u-tag>
					</view>
				</view>
				<view class="u-line-1 text-three">{{j.prepaidNumber}}&nbsp;&nbsp;{{j.phone}}</view>
			</view>
			<view class="flex-col flex-row wraper-col-two" v-if="j.type==='物业费'">
				<view>
					<view class="u-line-1 text-two">
						{{j.type}}
					</view>
					<view style="float: left;bottom: 5rpx;" v-if="j.state==='1'">
						<u-tag style="width: 100rpx;" text="欠费" type="error"></u-tag>
					</view>
					<view style="float: left;bottom: 5rpx;" v-if="j.state==='2'">
						<u-tag style="width: 130rpx;" text="已缴费" type="success"></u-tag>
					</view>
				</view>
				<view class="u-line-1 text-three">{{j.address}} {{j.userName}}</view>
			</view>
			<view class="flex-col flex-row wraper-col-two" v-if="j.type==='电费'">
				<view>
					<view class="u-line-1 text-two">
						{{j.type}}
					</view>
					<view style="float: left;bottom: 5rpx;">
						<u-tag style="width: 130rpx;" text="已缴费" type="success"></u-tag>
					</view>
				</view>
				<view class="u-line-1 text-three">{{j.address}} {{j.userName}}</view>
			</view>
			<view class="flex-col flex-row wraper-col-two" v-if="j.type==='燃气费'">
				<view>
					<view class="u-line-1 text-two">
						{{j.type}}
					</view>
					<view style="float: left;bottom: 5rpx;">
						<u-tag style="width: 130rpx;" text="已缴费" type="success"></u-tag>
					</view>
				</view>
				<view class="u-line-1 text-three">{{j.address}} {{j.userName}}</view>
			</view>
			<view class="flex-col flex-row wraper-col-two" v-if="j.type==='宽带费'">
				<view>
					<view class="u-line-1 text-two">
						{{j.type}}
					</view>
					<view style="float: left;bottom: 5rpx;">
						<u-tag style="width: 130rpx;" text="已缴费" type="success"></u-tag>
					</view>

				</view>
				<view class="u-line-1 text-three">{{j.address}} {{j.userName}}</view>
			</view>
			<view class="flex-col flex-row wraper-col-two" v-if="j.type==='暖气费'">
				<view>
					<view class="u-line-1 text-two">
						{{j.type}}
					</view>
					<view style="float: left;bottom: 5rpx;">
						<u-tag style="width: 130rpx;" text="已缴费" type="success"></u-tag>
					</view>

				</view>
				<view class="u-line-1 text-three">{{j.address}} {{j.userName}}</view>
			</view>
			<u-icon class="icon-arrow-right" name="arrow-right" label-pos="left"></u-icon>
		</view>


		<view class="u-line-1 text-six">新增缴费</view>
		<view class="flex-row wrapper-three">
			<view class="flex-row wraper-col-seven">
				<view class="box">
					<uni-icons style="top: 6rpx;left: 1rpx;" type="staff" size="25"></uni-icons>
				</view>
				<view class="u-line-1 text-seven">物业费</view>
			</view>
			<view class="flex-row wraper-col-eight">
				<view class="box">
					<uni-icons style="top: 6rpx;left:5rpx;" type="settings-filled" size="25"></uni-icons>
				</view>
				<view class="u-line-1 text-eight">电费</view>
			</view>
		</view>
		<view class="flex-row wrapper-four">
			<view class="flex-row wraper-col-nine">
				<view class="box">
					<uni-icons style="top: 6rpx;left:5rpx;" type="eye" size="25"></uni-icons>

				</view>
				<view class="u-line-1 text-nine">水费</view>
			</view>
			<view class="flex-row wraper-col-ten">
				<view class="box">
					<uni-icons style="top: 6rpx;left:5rpx;" type="fire" size="25"></uni-icons>

				</view>
				<view class="u-line-1 text-ten">燃气费</view>
			</view>
		</view>
		<view class="flex-row wrapper-five">
			<view class="flex-row wraper-col-eleven">
				<view class="box">
					<uni-icons style="top: 6rpx;left:5rpx;" type="undo" size="25"></uni-icons>

				</view>
				<view class="u-line-1 text-eleven">宽带费</view>
			</view>
			<view class="flex-row wraper-col-twelve">
				<view class="box">
					<uni-icons style="top: 6rpx;left:5rpx;" type="home" size="25"></uni-icons>

				</view>
				<view class="u-line-1 text-twelve">暖气费</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				CommunityList: {}
			}
		},
		onLoad() {
			this.ListAll()
			user: {}
		},
		methods: {
			ListAll() {
				this.user = uni.getStorageSync('user')
				console.log(this.user)
				this.$axios({
					url: 'serverwg/gwb/GwbCommunityxx',
					data: {
						id: this.user.userId
					},
					method: 'GET',
					success: (res) => {
						this.CommunityList = res.data.data.GwbCommunityxxList
						console.log(this.CommunityList)
					}
				})
			},
			gotoInfo(j) {
				console.log(j)
				if (j.type === '水费' || j.type === '电费') {
					uni.navigateTo({
						url: '/pages/gwb/LifepayEye?j=' + JSON.stringify(j)
					})
				}
				if (j.type === '物业费') {
					uni.navigateTo({
						url: '/pages/gwb/LifepayOperation?j=' + JSON.stringify(j)
					})
				}
			}
		}
	}
</script>
<style lang="scss" scoped>
	/** 全局样式-开始,建议放在公共css样式文件中,比如common.css 或app.vue文件 */

	html,
	body {
		margin: 0;
		width: 100%;
		height: 100%;
		font-size: 16px;
		background-color: aliceblue;
	}

	view,
	text,
	image {
		position: relative;
		box-sizing: border-box;
		flex-shrink: 0;
	}

	.flex-col {
		display: flex;
		align-items: flex-start;
		flex-direction: column;

	}

	.flex-row {
		display: flex;
		align-items: flex-start;
	}

	.flex-col .flex-row {
		width: 100%;

	}

	/** 全局样式-结束*/

	.homepage {
		padding: 30rpx 0rpx 200rpx 40rpx;
		background-color: #dbf1e1;

		.text {
			width: 158rpx;
			margin-bottom: 50rpx;
			font-size: 32rpx;
			font-weight: 600;
			color: rgba(109, 109, 109, 1);
		}

		.wrapper {
			width: 690rpx;
			margin-bottom: 38rpx;
			padding: 29rpx 0rpx 42rpx 20rpx;
			border-radius: 18rpx;
			background: #f3f4f6;

			.wraper-col {
				width: 62rpx;
				height: 62rpx;
				margin: 26rpx 28rpx 0rpx 0rpx;
				border-radius: 40rpx;
				background: #71d5a1;
			}

			.wraper-col-two {
				width: 528rpx;

				.text-two {
					float: left;
					width: 138rpx;
					margin-bottom: 26rpx;
					font-size: 34rpx;
					font-weight: 600;
					color: rgba(109, 109, 109, 1);

				}

				.text-three {
					width: 100%;
					font-size: 28rpx;
					font-weight: 600;
					color: rgba(179, 177, 177, 1);
				}
			}

			.icon-arrow-right {
				width: 28rpx;
				margin-top: 40rpx;
				color: rgba(184, 178, 178, 1);
			}

		}

		.wrapper-two {
			width: 690rpx;
			height: 180rpx;
			justify-content: space-between;
			margin-bottom: 40rpx;
			padding: 32rpx 28rpx 0rpx 20rpx;
			border-width: 2rpx;
			border-style: solid;
			border-color: rgba(204, 204, 204, 1);

			.wraper-col-five {
				width: 63rpx;
				height: 63rpx;
				margin-top: 18rpx;
				border-radius: 40rpx;
				background: #71d5a1;
			}

			.wraper-col-six {
				width: 492rpx;

				.text-four {
					width: 106rpx;
					margin: 0rpx 0rpx 22rpx 2rpx;
					font-size: 34rpx;
					font-weight: 600;
					color: rgba(109, 109, 109, 1);
				}

				.text-five {
					width: 100%;
					font-size: 28rpx;
					font-weight: 600;
					color: rgba(179, 177, 177, 1);
				}
			}

			.icon-arrow-right-two {
				width: 28rpx;
				margin-top: 38rpx;
				color: rgba(184, 178, 178, 1);
			}
		}

		.text-six {
			width: 158rpx;
			margin-bottom: 38rpx;
			font-size: 32rpx;
			font-weight: 600;
			color: rgba(109, 109, 109, 1);
		}

		.wrapper-three {
			width: 678rpx;
			justify-content: space-between;
			margin: 0rpx 0rpx 30rpx 12rpx;
			padding-right: 1rpx;

			.wraper-col-seven {
				width: 314rpx;
				justify-content: space-between;
				padding: 36rpx 109rpx 40rpx 22rpx;
				border-color: rgba(208, 208, 208, 1);
				border-radius: 18rpx;
				background: #f3f4f6;

				.box {
					width: 58rpx;
					height: 58rpx;
					border-width: 2rpx;
					border-style: solid;
					border-color: rgba(217, 217, 217, 1);
					border-radius: 40rpx;
					background: #71d5a1;
				}

				.text-seven {
					width: 108rpx;
					margin-top: 10rpx;
					font-size: 34rpx;
					font-weight: 600;
					color: rgba(109, 109, 109, 1);
				}
			}

			.wraper-col-eight {
				width: 314rpx;
				justify-content: space-between;
				padding: 36rpx 133rpx 40rpx 22rpx;
				border-color: rgba(208, 208, 208, 1);
				border-radius: 18rpx;
				background: #f3f4f6;

				.box {
					width: 58rpx;
					height: 58rpx;
					border-width: 2rpx;
					border-radius: 40rpx;
					background: #71d5a1;
				}

				.text-eight {
					width: 80rpx;
					margin-top: 6rpx;
					font-size: 34rpx;
					font-weight: 600;
					color: rgba(109, 109, 109, 1);
				}
			}
		}

		.wrapper-four {
			width: 678rpx;
			justify-content: space-between;
			margin: 0rpx 0rpx 30rpx 12rpx;

			.wraper-col-nine {
				width: 314rpx;
				justify-content: space-between;
				padding: 36rpx 133rpx 40rpx 22rpx;
				border-color: rgba(208, 208, 208, 1);
				border-radius: 18rpx;
				background: #f3f4f6;

				.box {
					width: 58rpx;
					height: 58rpx;
					border-radius: 40rpx;
					background: #71d5a1;
				}

				.text-nine {
					width: 80rpx;
					margin-top: 6rpx;
					font-size: 34rpx;
					font-weight: 600;
					color: rgba(109, 109, 109, 1);
				}
			}

			.wraper-col-ten {
				width: 314rpx;
				justify-content: space-between;
				padding: 36rpx 109rpx 40rpx 22rpx;
				border-color: rgba(208, 208, 208, 1);
				border-radius: 18rpx;
				background: #f3f4f6;

				.box {
					width: 58rpx;
					height: 58rpx;

					border-radius: 40rpx;
					background: #71d5a1;
				}

				.text-ten {
					width: 108rpx;
					margin-top: 10rpx;
					font-size: 34rpx;
					font-weight: 600;
					color: rgba(109, 109, 109, 1);
				}
			}
		}

		.wrapper-five {
			width: 678rpx;
			justify-content: space-between;
			margin-left: 12rpx;

			.wraper-col-eleven {
				width: 314rpx;
				justify-content: space-between;
				padding: 36rpx 109rpx 40rpx 22rpx;
				border-color: rgba(208, 208, 208, 1);
				border-radius: 18rpx;
				background: #f3f4f6;

				.box {
					width: 58rpx;
					height: 58rpx;

					border-radius: 40rpx;
					background: #71d5a1;
				}

				.text-eleven {
					width: 108rpx;
					margin-top: 10rpx;
					font-size: 34rpx;
					font-weight: 600;
					color: rgba(109, 109, 109, 1);
				}
			}

			.wraper-col-twelve {
				width: 314rpx;
				justify-content: space-between;
				padding: 36rpx 109rpx 40rpx 22rpx;
				border-color: rgba(208, 208, 208, 1);
				border-radius: 18rpx;
				background: #f3f4f6;

				.box {
					width: 58rpx;
					height: 58rpx;

					border-radius: 40rpx;
					background: #71d5a1;
				}

				.text-twelve {
					width: 108rpx;
					margin-top: 10rpx;
					font-size: 34rpx;
					font-weight: 600;
					color: rgba(109, 109, 109, 1);
				}
			}
		}
	}
</style>
